<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
		<li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
                <!-- <div class="w-lg"> -->
                    <form ng-submit="search()" class="form-horizontal">
                    	<div class="form-group">
                    		<label class="col-sm-1 control-label">投放平台:</label>
                    		<div class="col-sm-2">
                            	<select class="form-control" ng-model="param.deliveryPlatform">
                            		<option value="">--请选择--</option>
                        			<option value="1">联币金融</option>
                        			<option value="2">智仟汇</option>
                        			<option value="3">糯糯金服</option>
                        		</select>
                        	</div>
                        	
                        	<label class="col-sm-1 control-label">平台应用:</label>
                    		<div class="col-sm-2">
                            	<select class="form-control" ng-model="param.platformApp">
                            		<option value="">--请选择--</option>
                        			<option value="1">APP</option>
                        			<option value="2">网站</option>
                        		</select>
                        	</div>
                        	
                        	<label class="col-sm-1 control-label">计价模式:</label>
                    		<div class="col-sm-2">
                            	<select class="form-control" ng-model="param.valuationModel">
                            		<option value="">--请选择--</option>
                        			<option value="1">CPC</option>
                        			<option value="2">CPS</option>
                        			<option value="3">CPA</option>
                        			<option value="4">CPM</option>
                        		</select>
                        	</div>
                        	
                        	<label class="col-sm-1 control-label">标签:</label>
                    		<div class="col-sm-2">
                            	<input type="text" class="form-control" placeholder="标签" ng-model="param.advertLabel">
                        	</div>
                    	</div>
                    	
                    	<div class="form-group">
                    		<label class="col-sm-1 control-label">审核状态:</label>
                    		<div class="col-sm-2">
                            	<select class="form-control" ng-model="param.approveState">
                        			<option value="">全部</option>
                        			<option value="0">未审核</option>
                        			<option value="1">审核通过</option>
                        			<option value="2">审核拒绝</option>
                        		</select>
                        	</div>
                        	
                        	<label class="col-sm-1 control-label">申请时间:</label>
                    		<div class="col-sm-2">
                            	<div class="input-daterange input-group">
                            		<input type="text" ng-model="param.applyTime" class="form-control" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss', start: laydate.now(0, 'YYYY-MM-DD hh:mm:ss')})"/>
                            	</div>
                        	</div>
                        	
                        	<label class="col-sm-1 control-label">审核时间:</label>
                    		<div class="col-sm-2">
                            	<div class="input-daterange input-group">
                            		<input type="text" ng-model="param.approveTime" class="form-control" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss', start: laydate.now(0, 'YYYY-MM-DD hh:mm:ss')})"/>
                            	</div>
                        	</div>
                    	</div>
                    	
                    	<div class="form-group">
                    		<div class="row">
								<label class="col-sm-1 control-label"><button class="ifc-btn btn-primary" type="submit">查 询</button></label>
							</div>
                    	</div>
                        <!-- <div class="input-group search-box">
                            <input type="text" class="form-control" ng-model="param.keyword" placeholder="账户名、用户名、联系方式">
                            <i ng-show="user.keyword" ng-click="clearSearch()" class="fa fa-times-circle text-muted search-clear"></i>
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="submit" style="height: 38px;"><i class="fa fa-search"></i></button>
                            </span>
                        </div> -->
                    </form>
                <!-- </div> -->
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>邮箱</th>
                        <th>投放平台</th>
                        <th>平台应用</th>
                        <th>广告位置</th>
                        <th>计价模式</th>
                        <th>价格</th>
                        <th>标签</th>
                        <th>申请时间</th>
                        <th>审核时间</th>
                        <th>审核状态</th>
                        <th>查看</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td>{{$index + 1}}</td>
                        <td class="v-middle">{{item.email}}</td>
                        <td class="v-middle">
                        	<span ng-if="item.deliveryPlatform==1">联币金融</span>
                        	<span ng-if="item.deliveryPlatform==2">智仟汇</span>
                        	<span ng-if="item.deliveryPlatform==3">糯糯金服</span>
                        </td>
                        <td class="v-middle">
                        	<span ng-if="item.platformApp==1">APP</span>
                        	<span ng-if="item.platformApp==2">网站</span>
                        </td>
                        <td class="v-middle">
                        	<span ng-if="item.advertPosition==1">首页BANNER</span>
                        	<span ng-if="item.advertPosition==2">轮播图片</span>
                        </td>
                        <td class="v-middle">
                        	<span ng-if="item.valuationModel==1">CPC</span>
                        	<span ng-if="item.valuationModel==2">CPS</span>
                        	<span ng-if="item.valuationModel==3">CPA</span>
                        	<span ng-if="item.valuationModel==4">CPM</span>
                        </td>
                        <td class="v-middle">{{item.modelPrice}}</td>
                        <td class="v-middle">{{item.advertLabel}}</td>
                        <td class="v-middle">{{item.applyTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td class="v-middle">
                        	<span ng-if="item.approveState==0">-</span>
                        	<span ng-if="item.approveState==1 || item.approveState==2">{{item.approveTime | date:'yyyy-MM-dd hh:mm:ss'}}</span>
                        </td>
                        
                        <td class="v-middle">
                            <span ng-if="item.approveState==0">未审核</span>
                            <span ng-if="item.approveState==1">审核通过</span>
                            <span ng-if="item.approveState==2">审核拒绝</span>
                        </td>
                        <td class="v-middle">
                            <a ui-sref="main.biz.advertise.detail({id: item.id})" class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>详情</a>
                        </td>
                        <td class="v-middle">
                            <button type="button" ng-if="item.approveState==0" ng-click="approve(item.id,1)" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-ban m-r-xs text-sm"></i>通过</button>
                            <button type="button" ng-if="item.approveState==0" ng-click="approve(item.id,2)" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-check m-r-xs text-sm"></i>拒绝</button>
                            <button type="button" ng-if="item.enable==1" ng-click="open(item.id,0)" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-ban m-r-xs text-sm"></i>停止</button>
                            <button type="button" ng-if="item.enable==0" ng-click="open(item.id,1)" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-check m-r-xs text-sm"></i>开启</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

</div><!-- /.wrapper-md -->